-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: override get/setproperty and propertynames #517
Conversation
Minimal example: @pyimport numpy as np
np.random.rand() #works now Autocompletion works as well, i.e. |
Thanks. I was planning on waiting a little while to do this, so that we can:
|
90c80e2
to
e44aa36
Compare
Ok, I tried to implement all your comments. Replacing I look forward to comments and suggestions. |
Codecov Report
@@ Coverage Diff @@
## master #517 +/- ##
=======================================
- Coverage 54.09% 53% -1.1%
=======================================
Files 19 19
Lines 1525 1566 +41
=======================================
+ Hits 825 830 +5
- Misses 700 736 +36
Continue to review full report at Codecov.
|
BTW, regarding your third point above, I really like the "@pyimport numpy as np" syntax because it's basically the same in python. Maybe we can keep it as syntactic sugar? |
(I can't workout if that has been done, so many things in this package are called |
No. The only reason that sugar exists was the lack of dot overloading. Now you can do |
I understand why the macro was necessary. But as I said, I would see a benefit in the second syntax because it's close to what you do in python (and this is a python interface). I won't push this point any further though. |
Added some simple tests. What should I do next to move forward with this? |
perfect, thanks for the amazing work on this PR! Notice that most of my warnings come from files within PyPlot so someone else should open a PR there. |
Ok, AFAICS this PR should now be technically mergable (let's see if the tests pass on Linux and MacOS as well). I fixed all the merge conflicts, deprecated the However,
Since it's already after midnight, I guess it's time to go to bed :) |
The single appveyor fail seems to be a random network issue. |
AppVeyor failure is an unrelated network glitch. |
See #629 for remaining steps. |
Big thanks to @crstnbr for the big merge! |
The intent of this PR is to use 0.7/1.0's getproperty functionality to make
o.foo
behave as in Python, i.e. to map it to the currento[:foo]
.